package com.ems.mapper;

import com.ems.entity.RoleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author WuZH
 * @since 2023-10-24
 */
@Mapper
public interface RoleMapper extends BaseMapper<RoleEntity> {

    @Select ( value = "SELECT * FROM role_info ri LIMIT #{RoleEntity.page}, #{RoleEntity.limit}" )
    List<RoleEntity> queryList ( @Param ( "RoleEntity" ) RoleEntity roleEntity );

    @Select ( value = "SELECT COUNT(1) FROM role_info ri" )
    Integer queryCount ( @Param ( "RoleEntity" ) RoleEntity RoleEntity );

}
